
/**
 * 文件下载
 * @param filename 文件名
 * @param data blob
 */
export const download = (filename: string, data:Blob) => {
    const aDiv = document.createElement("a")
    aDiv.setAttribute('download', filename)
    const url =window.URL.createObjectURL(data)
    aDiv.setAttribute('href',url)
    aDiv.click()
    window.URL.revokeObjectURL(url)
}
